package com.wuwei.tms.setting.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.wuwei.tms.pojo.ToolType;
import com.wuwei.tms.pojo.UserType;
import com.wuwei.tms.setting.mapper.UserTypeMapper;
import com.wuwei.tms.utils.result.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping(value="/T01/userType")
public class UserTypeController {

    @Resource
    private UserTypeMapper userTypeMapper;

    @GetMapping("/all")
    public Result<List<UserType>> getAll (){
        LambdaQueryWrapper<UserType> queryWrapper = new LambdaQueryWrapper<>();
        List<UserType> userTypes = userTypeMapper.selectList(queryWrapper);
        return Result.ok(userTypes);
    }

}
